/**
 *  设备相关接口
 * **/

import request from '@/common/request.js'
import {HTTP_REQUEST_URL,http_request_url_java} from '@/config.js' 

const ydc_api={}

// 获取生境 
ydc_api.getEnvtype = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/project/commondata',   
	data: data   
}) 

// 上传数据 
ydc_api.addDcData = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/ydc/addpcdata',   
	data: data   
}) 

// 获取天气信息  (高德api)
ydc_api.getWeather = data => request.vGet({ 
	url: 'https://restapi.amap.com/v3/weather/weatherInfo',   
	data: data   
}) 

// 高德坐标转化
ydc_api.convert = data => request.vGet({ 
	url: 'https://restapi.amap.com/v3/assistant/coordinate/convert',   
	data: data   
})

// 获取位置详细信息 (高德api)
ydc_api.getCityInfo = data => request.vGet({ 
	url: 'https://restapi.amap.com/v3/geocode/regeo',   
	data: data   
}) 


// 上传轨迹信息 
ydc_api.addLocus = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/ydc/locus',   
	data: data   
})

// 上传轨迹信息 
ydc_api.adCode = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/ydc/adcode',   
	data: data   
})

// 上传轨迹信息 
ydc_api.addMarkers = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/addMarkers',   
	data: data   
})

// 计算调查面积
ydc_api.countDcArea = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/count-dc-area',   
	data: data   
})

// 计算调查面积
ydc_api.countDcArea_new = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/count-dc-area-new',   
	data: data   
})

ydc_api.updateCollectData = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/updateCollectData',   
	data: data   
})

ydc_api.updateCollectData_new = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/updateCollectData-new',   
	data: data   
})



// 上传轨迹信息 
ydc_api.addUserLocus = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/ydcpro/addUserLocus',   
	data: data   
})

// 获取省份列表 
ydc_api.getProvince= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/yun/area-list',   
	data: data   
})

// 获取街道 
ydc_api.getStreet= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/yun/street',   
	data: data   
})

// 获取查询数据 
ydc_api.getdataInfo= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/ydc/data-info',   
	data: data   
})

// 获取防控列表 
ydc_api.getPcDataList= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/ydc/pcdatalist',   
	data: data   
})

// 获取防控数据详情 
ydc_api.getPcDataDetail= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/ydc/pcdata',   
	data: data   
})

// 删除数据 
ydc_api.deleteData= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/ydc/deletedata',   
	data: data   
})




 

  
export default ydc_api






